let Main = () => import('@/views/Main.vue');

export default [
    // ------首页------
    {
        path: 'home',
        name: 'homepage',
        component: Main,
        meta: {
            title: 'home',
            icon: 'icon-shouye',
        },
        children:[
            {
                path: '',
                name: 'home',
                component: () => import('@/views/Home.vue'),
                meta: {
                    title: 'home',
                    icon: 'icon-shouye',
                },
            }
        ]
    },
    // ------运营管理------
    {
        path: 'operation',
        name: 'operation',
        component: Main,
        meta: {//运营管理
            title: 'operation.operationmanagement',
            icon: 'icon-yunying',
        },
        children: [
            {//订单管理
                path: 'oder',
                name: 'oder',
                component: () => import('@/views/operation/Order.vue'),
                meta: { title: "operation.ordermanagement", }
            },
            {//评论管理
                path: 'comment',
                name: 'comment',
                component: () => import('@/views/operation/Comment.vue'),
                meta: { title: "operation.commentmanagement", }
            },
            {//运费管理
                path: 'freight',
                name: 'freight',
                component: () => import('@/views/operation/Freight.vue'),
                meta: { title: "operation.freightmanagement", }
            },
        ]
    },
    // ------商品管理------
    {
        path: 'commodity',
        name: 'commodity',
        component: Main,
        meta: {//商品管理
            title: 'commodity.commoditymanagement',
            icon: 'icon-shangpinguanli',
        },
        children: [
            {//商品列表
                path: 'productlist',
                name: 'productlist',
                component: () => import('@/views/commodity/ProductList.vue'),
                meta: { title: "commodity.productlist",show:true, }
            },
             {//商品列表添加
                path: 'productlistcreate',
                name: 'productlistcreate',
                component: () => import('@/views/commodity/productlist/Create.vue'),
                meta: { title: "commodity.productaddition",show:false, keepAlive:true}
            },
             {//商品列表编辑
                path: 'productlistmodify:id',
                name: 'productlistmodify',
                component: () => import('@/views/commodity/productlist/Modify.vue'),
                meta: { title: "commodity.productediting",show:false,keepAlive:true }
            },
            {//团购商品
                path: 'group',
                name: 'group',
                component: () => import('@/views/commodity/Group.vue'),
                meta: { title: "commodity.grouppurchasecommodities", }
            },
            {//团购商品
                path: 'category',
                name: 'category',
                component: () => import('@/views/commodity/Category.vue'),
                meta: { title: "commodity.categorymanagement", }
            },
        ]
    },
    // ------推广管理------
    {
        path: 'promotion',
        name: 'promotion',
        component: Main,
        meta: {//推广管理
            title: 'promotion.promotionmanagement',
            icon: 'icon-cangchuyingyong',
        },
        children: [
            {//广告管理
                path: 'advertising',
                name: 'advertising',
                component: () => import('@/views/promotion/Advertising.vue'),
                meta: { title: "promotion.advertisingmanagement", }
            },
            {//优惠劵管理
                path: 'coupon',
                name: 'coupon',
                component: () => import('@/views/promotion/Coupon.vue'),
                meta: { title: "promotion.couponmanagement", }
            },
        ]
    },
    // ------用户管理------
    {
        path: 'user',
        name: 'user',
        component: Main,
        meta: {//用户管理
            title: 'user.usermanagement',
            icon: 'icon-yonghuguanli',
        },
        children: [
            {//用户管理
                path: 'membership',
                name: 'membership',
                component: () => import('@/views/user/Membership.vue'),
                meta: { title: "user.membershipmanagement", }
            },
            {//用户管理
                path: 'address',
                name: 'address',
                component: () => import('@/views/user/Address.vue'),
                meta: { title: "user.addressmanagement", }
            },
        ]
    },
    // ------系统管理------
    {
        path: 'system',
        name: 'system',
        component: Main,
        meta: {//用户管理
            title: 'system.systemmanagement',
            icon: 'icon-xitongguanli',
        },
        children: [
            {//系统配置
                path: 'systemconfig',
                name: 'systemconfig',
                component: () => import('@/views/system/SystemConfig.vue'),
                meta: { title: "system.systemconfig", }
            },
            {//管理员
                path: 'administrators',
                name: 'administrators',
                component: () => import('@/views/system/Administrators.vue'),
                meta: { title: "system.administrators", }
            },
            {//操作日志
                path: 'operationlog',
                name: 'operationlog',
                component: () => import('@/views/system/OperationLog.vue'),
                meta: { title: "system.operationlog", }
            },
            {//角色管理
                path: 'role',
                name: 'role',
                component: () => import('@/views/system/Role.vue'),
                meta: { title: "system.rolemanagement", }
            },
        ]
    },
]